package com.jinyao.exploit.common.base.dao;

import com.jinyao.exploit.common.base.entity.TreeEntity;
import org.apache.ibatis.annotations.Select;

/**
 * 树形dao
 * @param <T>
 */
public interface TreeDao<T extends TreeEntity<T>> extends CrudDao<T> {
    @Select("select max(sort) from ${tableName} where parent_id = #{parentId}")
    Integer getMaxSort(String tableName, Long parentId);
}